﻿@model V_SerialNoListDataSet.V_SERIALNOLISTDataTable
@{
    ViewBag.Title = "我的账号管理(列表)";
    Layout = "~/Areas/HomePage/Views/Shared/DefaultLayout.cshtml";

}
@section ScriptContent
{
    <script type="text/javascript">
        $(function () {

            $(".cusRegSn").addClass("hover");
            var valid = $("form").validate({
                rules: {
                    "mobile": { required: true }
                },
                messages: {
                    "mobile": { required: "手机号码不能为空" }
                }, errorPlacement: function (error, element) {
                    $("button").after(error);
                }
            });

            valid.form();

        });


    </script>
}
<dl class="right_side_dl">
    <dt class="right_side_dt">我的账号管理(列表)</dt>
    <dd class="right_side_dd">
        <dl class="content">
            <dt>注册新手机号码:</dt>
            <dd>
                <div style="padding: 10px 2px; border-bottom: #4e9fc8 solid 1px;">
                    <form method="post" action="@Url.Action("RegisterMobile")">
                    手机号码:
                    <input type="text" name="mobile" value="" class="input_text" />
                    <button type="submit" class="btn">
                        注册新手机</button></form>
                </div>
            </dd>
            <dt>已经注册手机列表</dt>
            @{
                for (int i = 0; i < Model.Count; i++)
                {
                    var item = Model[i];
                    var isAltRow = i % 2 != 0;
                    var altRowCss = string.Format("{0}", isAltRow ? "class=c1" : string.Empty);
                <dd>
                    <table width="100%" class="blue_table">
                        <tbody>
                            <tr @altRowCss>
                                <td class="w80">
                                    序号
                                </td>
                                <td colspan="3">
                                    @item.SN
                                </td>
                                <td class="w80">
                                </td>
                                <td class="w120">
                                </td>
                                <td class="w80">
                                    手机号码
                                </td>
                                <td class="w120">
                                    @item.MOBILE
                                </td>
                            </tr>
                            <tr @altRowCss>
                                <td>
                                    手机串号
                                </td>
                                <td>
                                    @item.IMEI
                                </td>
                                <td>
                                    手机型号
                                </td>
                                <td>
                                    @item.MOBILEMODEL
                                </td>
                                <td>
                                    首次登陆
                                </td>
                                <td>
                                    @string.Format("{0}", item.IsFIRSTLOGINTIMENull() ? string.Empty : item.FIRSTLOGINTIME.ToString())
                                </td>
                                <td>
                                    状态
                                </td>
                                <td>
                                    @SerialHelper.GetStatusDescription(item.STATUS)
                                </td>
                            </tr>
                            <tr @altRowCss>
                                <td>
                                    操作平台
                                </td>
                                <td>
                                    @item.PLATFORM
                                </td>
                                <td>
                                    平台版本
                                </td>
                                <td>
                                    @item.PLATFORMVERSION
                                </td>
                                <td>
                                    最后登陆
                                </td>
                                <td>
                                    @string.Format("{0}", item.IsLASTLOGINTIMENull() ? string.Empty : item.LASTLOGINTIME.ToString())
                                </td>
                                <td>
                                </td>
                                <td>
                                    @{
                               if (item.STATUS != (int)SerialNoStatus.Locked)
                               {
                                   WriteLiteral(Html.ActionLink("更换手机", "ModifyMobile", new { sn = item.SN }
                                       , new { onclick = "return confirm('警告,更换手机将导致不能登陆')" }));
                               }
                                    }
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </dd>
                }
            }
        </dl>
    </dd>
</dl>
<div class="right_bottom">
</div>
